package com.gzg.userservice.pulisher;

import com.gzg.userservice.domain.po.Log;
import lombok.RequiredArgsConstructor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

@RequiredArgsConstructor
public class MqPublisher {

    public final RabbitTemplate rabbitTemplate;

    public void PublishFanoutMessage(Log log) {
        // 1.队列名称
        String exName = "simple.fanout";
        rabbitTemplate.convertAndSend(exName,"",log);
    }
}
